From 91b1a613d9880a127308252c008c01ec24f9fffb Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 11 Jun 2014 02:57:44 +0000 Subject: [PATCH] Revert bad commit of gui/processwait,mainwindow --- gpsbabel/gui/mainwindow.cc | 2 -- gpsbabel/gui/processwait.cc | 31 +++++-------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/gpsbabel/gui/mainwindow.cc b/gpsbabel/gui/mainwindow.cc index d7f670e78..3ca27c5d1 100644 --- a/gpsbabel/gui/mainwindow.cc +++ b/gpsbabel/gui/mainwindow.cc @@ -955,8 +955,6 @@ void MainWindow::applyActionX() args << "-r"; if (babelData_.xlateTracks_ && ifmt.isReadTracks() && ofmt.isWriteTracks()) args << "-t"; - - args << "-vs"; // Input type, with options bool iisFile = (babelData_.inputType_ == BabelData::fileType_); diff --git a/gpsbabel/gui/processwait.cc b/gpsbabel/gui/processwait.cc index cd756bfa8..6160b73a8 100644 --- a/gpsbabel/gui/processwait.cc +++ b/gpsbabel/gui/processwait.cc @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -99,7 +98,6 @@ ProcessWaitDialog::ProcessWaitDialog(QWidget *parent, QProcess *process): bufferedOut_ = ""; // -#if 0 for (int i=0; i<=100; i+=2) progressVals_.push_back(i); for (int i=98; i>0; i-=2) @@ -114,7 +112,7 @@ ProcessWaitDialog::ProcessWaitDialog(QWidget *parent, QProcess *process): ecode_ = 0; timer_->start(); errorString_ = ""; -#endif + } //------------------------------------------------------------------------ @@ -145,7 +143,6 @@ void ProcessWaitDialog::stopClickedX() process_->terminate(); }; //------------------------------------------------------------------------ - void ProcessWaitDialog::timeoutX() { progressIndex_++; @@ -175,9 +172,7 @@ void ProcessWaitDialog::finishedX(int exitCode, QProcess::ExitStatus es) ecode_ = exitCode; if (es == QProcess::CrashExit) errorString_ = QString(tr("Process crashed whle running")); - if (timer_ != NULL) { -// timer_->stop(); - } + timer_->stop(); accept(); }; @@ -206,30 +201,14 @@ void ProcessWaitDialog::appendToText(const char *ptr) void ProcessWaitDialog::readyReadStandardErrorX() { QByteArray d = process_->readAllStandardError(); -qDebug() << d; -// appendToText(d.data()); + appendToText(d.data()); }; //------------------------------------------------------------------------ void ProcessWaitDialog::readyReadStandardOutputX() -{ + { QByteArray d = process_->readAllStandardOutput(); - QString status(d); - QStringList completion = QString(d).split("/"); - - // We'll sometimes get > 1. This will also consume anything to stdout - // that isn't a vs output. We'll see if that's OK. - if (completion.size() == 0) { - appendToText(d.data()); - return; - } - if (completion.size() >= 3 && - completion[2].toInt() > progressBar_->maximum()) { - progressBar_->setRange(0, completion[2].toInt()); - } - if (completion.size() >= 2) { - progressBar_->setValue(completion[1].toInt()); - } + appendToText(d.data()); }; void ProcessWaitDialog::closeEvent(QCloseEvent *event) -- 2.30.2